package Anonymous02;

public class TestJump {
    public static void main(String[] args) {
        Jump j = new Cat();
        JumpOperator jo = new JumpOperator();
        Jump jDog = new Jump() {
            @Override
            public void Jump() {
                System.out.println("Dog jumps.");
            }
        };

        Jump jJoker = new Jump() {
            @Override
            public void Jump() {
                System.out.println("Joker jumps with a waving axe.");
            }
        };

        jo.actJump(j);
        jo.actJump(jDog);
        jo.actJump(jJoker);

        jo.actJump(new Jump() {
            @Override
            public void Jump() {
                System.out.println("Little cat jumps and eats your head.");
            }
        });
    }
}
